Skip to content

Conversation

alexcarpenter
Copy link
Member

@alexcarpenter alexcarpenter commented Oct 7, 2025

Description

Checkbox background color and icon

BEFORE AFTER
Screenshot 2025-10-07 at 10 46 45 AM Screenshot 2025-10-07 at 10 44 43 AM

Role select option styles

BEFORE AFTER
Screenshot 2025-10-07 at 10 46 28 AM Screenshot 2025-10-07 at 10 45 51 AM

UserPreview text variant within table usage

BEFORE AFTER
Screenshot 2025-10-08 at 10 19 46 AM Screenshot 2025-10-08 at 10 18 56 AM

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • Style
    • Refined checkbox visuals: crisper checkmark icon, improved sizing/positioning, and clearer checked-state color.
    • Unified hover and background styling for role options to use a consistent muted theme background for better contrast.
  • New Features
    • User Preview supports custom subtitle styling; lists now use a caption-style subtitle for clearer visual hierarchy.

Copy link

changeset-bot bot commented Oct 7, 2025

🦋 Changeset detected

Latest commit: 1067097

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Oct 8, 2025 2:47pm

Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Updated UI styling: checkbox checked appearance changed (new inline filled SVG, background sizing/position/repeat, and checked background color); role option hover/background now uses common.mutedBackground(theme) and renders labels with variant='subtitle'; UserPreview gained subtitleProps and subtitle text is used with variant='caption'. No control-flow changes.

Changes

Cohort / File(s) Summary of changes
Theme: Checkbox styling
packages/clerk-js/src/ui/baseTheme.ts
Added backgroundSize, backgroundPosition, and backgroundRepeat to the checkbox base style; replaced the checked-state backgroundImage with a smaller 8x8 filled inline SVG (white fill); removed previous stroke-based SVG and related overrides; set checked backgroundColor to theme.colors.$primary500.
List item & role option styling
packages/clerk-js/src/ui/components/OrganizationProfile/MemberListTable.tsx
Role option hover/background now uses common.mutedBackground(theme) instead of direct neutral tokens; option label renders with Text variant='subtitle' (replacing prior colorScheme usage).
UserPreview prop and usage
packages/clerk-js/src/ui/elements/UserPreview.tsx, packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx, packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx, packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
UserPreview props: added subtitleProps?: PropsOfComponent<typeof Text> and forward it to the subtitle Text. Call sites updated to pass subtitleProps={{ variant: 'caption' }} where applicable to render caption-styled secondary text.
Changeset
.changeset/huge-feet-enter.md
New changeset added describing the UI tweaks (checkbox, role select contrast, user preview subtitle).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I nibble styles with careful cheer,
A tiny SVG, crisp and clear.
Roles grown muted, subtitles small,
A hop, a tweak, I change them all.
Happy update from this rabbit 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The provided title indicates a refactor in clerk-js to address design feedback but is overly generic and does not specify the key UI changes such as updating the checkbox styling, adjusting role select option contrast, or modifying the subtitle text variant. While it relates to the changeset, it fails to clearly highlight the main changes for quick understanding. Consider revising the title to explicitly mention the primary updates, for example “refactor(clerk-js): update checkbox styling, role select contrast, and subtitle variant” to improve clarity and context.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch alexcarpenter/color-tweak-requests

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0c9d50b and 10ae43f.

📒 Files selected for processing (4)
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx (1 hunks)
  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx (1 hunks)
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx (1 hunks)
  • packages/clerk-js/src/ui/elements/UserPreview.tsx (3 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
packages/clerk-js/src/ui/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/clerk-js-ui.mdc)

packages/clerk-js/src/ui/**/*.{ts,tsx}: Element descriptors should always be camelCase
Use element descriptors in UI components to enable consistent theming and styling via appearance.elements
Element descriptors should generate unique, stable CSS classes for theming
Element descriptors should handle state classes (e.g., cl-loading, cl-active, cl-error, cl-open) automatically based on component state
Do not render hard-coded values; all user-facing strings must be localized using provided localization methods
Use the useLocalizations hook and localizationKeys utility for all text and error messages
Use the styled system (sx prop, theme tokens, responsive values) for custom component styling
Use useCardState for card-level state, useFormState for form-level state, and useLoadingStatus for loading states
Always use handleError utility for API errors and use translateError for localized error messages
Use useFormControl for form field state, implement proper validation, and handle loading and error states in forms
Use localization keys for all form labels and placeholders
Use element descriptors for consistent styling and follow the theme token system
Use the Card and FormContainer patterns for consistent UI structure

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{js,jsx,ts,tsx}: All code must pass ESLint checks with the project's configuration
Follow established naming conventions (PascalCase for components, camelCase for variables)
Maintain comprehensive JSDoc comments for public APIs
Use dynamic imports for optional features
All public APIs must be documented with JSDoc
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Profile and optimize critical paths
Validate all inputs and sanitize outputs
Implement proper logging with different levels

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
**/*.{js,jsx,ts,tsx,json,css,scss,md,yaml,yml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
packages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
packages/**/*.{ts,tsx,d.ts}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Packages should export TypeScript types alongside runtime code

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Prefer readonly for properties that shouldn't change after construction
Prefer composition and interfaces over deep inheritance chains
Use mixins for shared behavior across unrelated classes
Implement dependency injection for loose coupling
Let TypeScript infer when types are obvious
Use const assertions for literal types: as const
Use satisfies operator for type checking without widening
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Use type-only imports: import type { ... } from ...
No any types without justification
Proper error handling with typed errors
Consistent use of readonly for immutable data
Proper generic constraints
No unused type parameters
Proper use of utility types instead of manual type construction
Type-only imports where possible
Proper tree-shaking friendly exports
No circular dependencies
Efficient type computations (avoid deep recursion)

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{jsx,tsx}: Use error boundaries in React components
Minimize re-renders in React components

**/*.{jsx,tsx}: Always use functional components with hooks instead of class components
Follow PascalCase naming for components: UserProfile, NavigationMenu
Keep components focused on a single responsibility - split large components
Limit component size to 150-200 lines; extract logic into custom hooks
Use composition over inheritance - prefer smaller, composable components
Export components as named exports for better tree-shaking
One component per file with matching filename and component name
Use useState for simple state management
Use useReducer for complex state logic
Implement proper state initialization
Use proper state updates with callbacks
Implement proper state cleanup
Use Context API for theme/authentication
Implement proper state selectors
Use proper state normalization
Implement proper state persistence
Use React.memo for expensive components
Implement proper useCallback for handlers
Use proper useMemo for expensive computations
Implement proper virtualization for lists
Use proper code splitting with React.lazy
Implement proper cleanup in useEffect
Use proper refs for DOM access
Implement proper event listener cleanup
Use proper abort controllers for fetch
Implement proper subscription cleanup
Use proper HTML elements
Implement proper ARIA attributes
Use proper heading hierarchy
Implement proper form labels
Use proper button types
Implement proper focus management
Use proper keyboard shortcuts
Implement proper tab order
Use proper skip links
Implement proper focus traps
Implement proper error boundaries
Use proper error logging
Implement proper error recovery
Use proper error messages
Implement proper error fallbacks
Use proper form validation
Implement proper error states
Use proper error messages
Implement proper form submission
Use proper form reset
Use proper component naming
Implement proper file naming
Use proper prop naming
Implement proper...

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
**/*.{js,ts,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Support multiple Clerk environment variables (CLERK_, NEXT_PUBLIC_CLERK_, etc.) for configuration.

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.tsx: Use proper type definitions for props and state
Leverage TypeScript's type inference where possible
Use proper event types for handlers
Implement proper generic types for reusable components
Use proper type guards for conditional rendering

Files:

  • packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx
  • packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx
  • packages/clerk-js/src/ui/elements/UserPreview.tsx
🧬 Code graph analysis (1)
packages/clerk-js/src/ui/elements/UserPreview.tsx (1)
packages/clerk-js/src/ui/styledSystem/types.ts (1)
  • PropsOfComponent (58-58)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Formatting | Dedupe | Changeset
  • GitHub Check: Build Packages
  • GitHub Check: semgrep/ci
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (4)
packages/clerk-js/src/ui/components/OrganizationProfile/ActiveMembersList.tsx (1)

92-92: LGTM! Consistent subtitle styling applied.

The variant='caption' applied via subtitleProps aligns with the design adjustments across OrganizationProfile lists, ensuring consistent subtitle typography.

packages/clerk-js/src/ui/components/OrganizationProfile/RequestToJoinList.tsx (1)

87-87: LGTM! Consistent caption variant applied.

The subtitle styling matches the pattern used in ActiveMembersList and InvitedMembersList, providing uniform typography across organization member views.

packages/clerk-js/src/ui/components/OrganizationProfile/InvitedMembersList.tsx (1)

83-83: LGTM! Completes the consistent styling pattern.

This change aligns invitation row subtitle styling with active and requested member lists, achieving uniform typography across all OrganizationProfile member views.

packages/clerk-js/src/ui/elements/UserPreview.tsx (1)

28-28: Well-implemented extensibility for subtitle styling.

The new subtitleProps prop correctly uses PropsOfComponent<typeof Text> to type-safely forward Text component props to the subtitle. The implementation follows the established pattern (similar to mainIdentifierVariant) and maintains backwards compatibility.

Note: Line 176 spreads subtitleProps after colorScheme='secondary', allowing callers to override the default secondary color scheme if needed. Verify this override behavior aligns with the design requirements.

Also applies to: 67-67, 176-176


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

pkg-pr-new bot commented Oct 7, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6934

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@6934

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@6934

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@6934

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@6934

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@6934

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6934

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@6934

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@6934

@clerk/express

npm i https://pkg.pr.new/@clerk/express@6934

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@6934

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@6934

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@6934

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@6934

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@6934

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@6934

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6934

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@6934

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@6934

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@6934

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6934

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6934

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@6934

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@6934

commit: 1067097

as='span'
localizationKey={subtitle || identifier}
colorScheme='secondary'
variant='caption'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I don't like the end result

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djordjevanjek for visibility

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connected with George, and I've updated this change to only be present in table usage. The screenshots before/after have been updated in the description.

sx={theme => ({
'&:hover': {
backgroundColor: theme.colors.$neutralAlpha100,
background: common.mutedBackground(theme),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants